﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace RTracker.Models.Login
{
    /// <summary>
    /// Class for Login, used to get and set values of User properties.
    /// </summary>
    public class CLogin
    {
        #region DataMembers
        
        String m_strLogonName;
        String m_strLogonPassword;
        #endregion

        #region Constructor
        /// <summary>
        /// Constructor of the class to initiate private members.
        /// </summary>
        public CLogin()
        {
            m_strLogonName = "";
            m_strLogonPassword = "";
        }

        /// <summary>
        ///  Constructor of the class with parameters to initiate private members.
        /// </summary>
        public CLogin(string strLogonName, string strLogonPassword)
        {
            m_strLogonName = strLogonName;
            m_strLogonPassword = strLogonPassword;
        }
        #endregion

        #region Public Properties

        /// <summary>
        /// Used to store LogonName
        /// </summary>
        [Display(Name = "UserName")]
        public String LogonName
        {
            get { return m_strLogonName; }
            set { m_strLogonName = value; }
        }
        /// <summary>
        /// Used to store LogonPassword
        /// </summary>
        ///  [Required]
        [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "Password")]
        public String LogonPassword
        {
            get { return m_strLogonPassword; }
            set { m_strLogonPassword = value; }
        }
        #endregion
    }
}